/**************************************************************************//**
 * @item     CosyOS-III Kernel
 * @file     sv_com.h
 * @brief    系统内核专用API
 * @author   迟凯峰
 * @version  V1.2.0
 * @date     2025.03.30
 ******************************************************************************/

#ifndef __SV_COM_H
#define __SV_COM_H

#include "os_redef.h"
void      sv_insert_task_queue(s_tasknode_tsp htask);
void      sv_remove_task_queue(s_tasknode_tsp htask);
void      sv_task_add_ready   (s_tasknode_tsp htask);
void      sv_task_remove_ready(s_tasknode_tsp htask);
void      sv_free_task        (s_tasknode_tsp htask);
void      sv_resume_task      (s_tasknode_tsp htask);
void      sv_suspend_task     (s_tasknode_tsp htask);
void      sv_delete_task      (s_tasknode_tsp htask);
void      sv_clear_block      (s_tasknode_tsp htask);
void      sv_set_block        (s_tasknode_tsp htask, s_delay_t tick);
void      sv_set_taskpri      (s_tasknode_tsp htask, s_u8_t npri);
void      sv_remove_block_list(s_tasknode_tsp htask);
void      sv_insert_block_list(s_tasknode_tsp *h2task);
void      sv_delete_block_list(s_tasknode_tsp *h2task);
void      sv_insert_timer_list(void);
void      sv_give_binary      (s_binary_tsp hbin);
void      sv_give_semaphore   (s_semaph_tsp hsem);
void      sv_send_fetion      (s_tionbox_tsp htbox, m_fetion_t tion);
void      sv_send_mail        (s_mailbox_tsp hmbox, void *mail);
s_ecode_t sv_send_msg         (s_queue_tsp hque, void *msg);
void     *sv_recv_msg_static  (ss_queue_tsp hque);
void     *sv_recv_msg_dynamic (sd_queue_tsp hque);
void      sv_timint           (s_u8_t tmid, s_timint_t tick);
void      sv_timqry           (s_u8_t tmid, s_timqry_t tick);
void      sv_clear_delay      (void);
void      sv_update_rtccopy   (void);

#endif
